package com.hwj.utils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class JsonResponse implements Serializable {

    private Integer code;//状态编码
    private String msg; //提示信息
    private Object data;//数据

    public static JsonResponse successResponse(Integer code, String msg, Object data) {
        return new JsonResponse(code,msg,data);
    }

    public static JsonResponse failResponse(Integer code, String msg, Object data) {
        return new JsonResponse(code,msg,data);
    }

}
